﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MySql.Data.MySqlClient;

namespace Payroll
{
    class DBUtil
    {
        private static readonly string dbInfo = "server=rm-uf69e63c64p33851j3o.mysql.rds.aliyuncs.com;" +
                     "port=3306;user=paydev;password=QAZwsx11;database=pay_mng;Allow User Variables=True";

        public static MySqlConnection GetConnection()
        {
            return new MySqlConnection(dbInfo);
        }

        public static int GetNextId()
        {
            return int.Parse(DateTime.Now.ToString("MMddHHmmss"));
        }
    }
}
